Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix post install message for JanePHP components #1748

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

Korbeil
Copy link
Contributor

@Korbeil Korbeil commented Jan 28, 2025

Q A
License MIT
Packagist https://packagist.org/packages/jane-php/json-schema https://packagist.org/packages/jane-php/open-api-3

There was a \ in front of a </> which was breaking coloration. This PR is fixing this issue.

Copy link

Thanks for the PR 😍

How to test these changes in your application

  1. Define the SYMFONY_ENDPOINT environment variable:

    # On Unix-like (BSD, Linux and macOS)
    export SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1748/index.json
    # On Windows
    SET SYMFONY_ENDPOINT=https://raw.githubusercontent.com/symfony/recipes-contrib/flex/pull-1748/index.json
  2. Install the package(s) related to this recipe:

    composer req symfony/flex
    composer req 'jane-php/json-schema:^7.0' 'jane-php/open-api-common:^7.0'
  3. Don't forget to unset the SYMFONY_ENDPOINT environment variable when done:

    # On Unix-like (BSD, Linux and macOS)
    unset SYMFONY_ENDPOINT
    # On Windows
    SET SYMFONY_ENDPOINT=

Diff between recipe versions

In order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes.
I'm going keep this comment up to date with any updates of the attached patch.

jane-php/json-schema

5.0 vs 6.0
diff --git a/jane-php/json-schema/5.0/bin/jane-generate b/jane-php/json-schema/6.0/bin/jane-json-schema-generate
similarity index 50%
rename from jane-php/json-schema/5.0/bin/jane-generate
rename to jane-php/json-schema/6.0/bin/jane-json-schema-generate
index 0b13fca6..7fa9edfc 100755
--- a/jane-php/json-schema/5.0/bin/jane-generate
+++ b/jane-php/json-schema/6.0/bin/jane-json-schema-generate
@@ -3,11 +3,13 @@
 
 require __DIR__ . '/../vendor/autoload.php';
 
-use Jane\JsonSchema\Command\GenerateCommand;
+use Jane\JsonSchema\Console\Command\GenerateCommand;
 use Symfony\Component\Console\Input\ArrayInput;
 use Symfony\Component\Console\Output\NullOutput;
+use Jane\JsonSchema\Console\Loader\ConfigLoader;
+use Jane\JsonSchema\Console\Loader\SchemaLoader;
 
-$command = new GenerateCommand();
-$inputArray = new ArrayInput(['--config-file' => __DIR__ . '/../config/jane/config.php'], $command->getDefinition());
+$command = new GenerateCommand(new ConfigLoader(), new SchemaLoader());
+$inputArray = new ArrayInput(['--config-file' => __DIR__ . '/../config/jane/json_schema.php'], $command->getDefinition());
 
 $command->execute($inputArray, new NullOutput());
diff --git a/jane-php/json-schema/5.0/config/jane/config.php b/jane-php/json-schema/6.0/config/jane/json_schema.php
similarity index 100%
rename from jane-php/json-schema/5.0/config/jane/config.php
rename to jane-php/json-schema/6.0/config/jane/json_schema.php
diff --git a/jane-php/json-schema/5.0/config/packages/jane.yaml b/jane-php/json-schema/6.0/config/packages/jane.yaml
index 59ff9b33..4bc2f383 100644
--- a/jane-php/json-schema/5.0/config/packages/jane.yaml
+++ b/jane-php/json-schema/6.0/config/packages/jane.yaml
@@ -1,25 +1,6 @@
 services:
-    jane.serializer.json_encode:
-        class: Symfony\Component\Serializer\Encoder\JsonEncode
-        arguments:
-            - { json_encode_options: 64 } # \JSON_UNESCAPED_SLASHES
+    _defaults:
+        autowire: true
+        autoconfigure: true
 
-    jane.serializer.json_decode:
-        class: Symfony\Component\Serializer\Encoder\JsonDecode
-        arguments:
-            - { json_decode_associative: false }
-
-    jane.serializer.json_encoder:
-        class: Symfony\Component\Serializer\Encoder\JsonEncoder
-        arguments:
-            - '@jane.serializer.json_encode'
-            - '@jane.serializer.json_decode'
-
-#    jane.serializer.object:
-#        class: MyApp\Library\Generated\Normalizer\JaneObjectNormalizer
-#
-#    jane.serializer:
-#        class: Symfony\Component\Serializer\Serializer
-#        arguments:
-#            - ['@serializer.denormalizer.array', '@jane.serializer.object']
-#            - ['@jane.serializer.json_encoder']
+#    MyApp\Library\Generated\Normalizer\JaneObjectNormalizer: null
diff --git a/jane-php/json-schema/5.0/manifest.json b/jane-php/json-schema/6.0/manifest.json
index e2920638..a55f0fce 100644
--- a/jane-php/json-schema/5.0/manifest.json
+++ b/jane-php/json-schema/6.0/manifest.json
@@ -2,5 +2,8 @@
     "copy-from-recipe": {
         "bin/": "%BIN_DIR%/",
         "config/": "%CONFIG_DIR%/"
+    },
+    "conflict": {
+        "symfony/symfony": "<5.0"
     }
 }
diff --git a/jane-php/json-schema/5.0/post-install.txt b/jane-php/json-schema/6.0/post-install.txt
index 8b1d9fea..f9596417 100644
--- a/jane-php/json-schema/5.0/post-install.txt
+++ b/jane-php/json-schema/6.0/post-install.txt
@@ -1,8 +1,8 @@
   * Finish package configuration:
-    1. Configure config/jane/config.php with your specification details
-    2. Run bin/jane-generate
+    1. Configure config/jane/json_schema.php with your specification details
+    2. Run bin/jane-json-schema-generate
     3. Add generated/ directory to your composer autoload definition (eg. "MyApp\\Library\\Generated\\": "generated/")
-    4. Open config/packages/jane.yaml and replace MyApp\Library\Generated\Normalizer\JaneObjectNormalizer class with your generated normalizer.
+    4. Open config/packages/jane.yaml and replace MyApp\Library\Generated namespace with your generated namespace.
     5. Then remove line comments
 
 Documentation: https://jane.readthedocs.io/en/latest/
6.0 vs 7.0
diff --git a/jane-php/json-schema/6.0/bin/jane-json-schema-generate b/jane-php/json-schema/7.0/bin/jane-json-schema-generate
index 7fa9edfc..55e71e67 100755
--- a/jane-php/json-schema/6.0/bin/jane-json-schema-generate
+++ b/jane-php/json-schema/7.0/bin/jane-json-schema-generate
@@ -3,11 +3,11 @@
 
 require __DIR__ . '/../vendor/autoload.php';
 
-use Jane\JsonSchema\Console\Command\GenerateCommand;
+use Jane\Component\JsonSchema\Console\Command\GenerateCommand;
+use Jane\Component\JsonSchema\Console\Loader\ConfigLoader;
+use Jane\Component\JsonSchema\Console\Loader\SchemaLoader;
 use Symfony\Component\Console\Input\ArrayInput;
 use Symfony\Component\Console\Output\NullOutput;
-use Jane\JsonSchema\Console\Loader\ConfigLoader;
-use Jane\JsonSchema\Console\Loader\SchemaLoader;
 
 $command = new GenerateCommand(new ConfigLoader(), new SchemaLoader());
 $inputArray = new ArrayInput(['--config-file' => __DIR__ . '/../config/jane/json_schema.php'], $command->getDefinition());

jane-php/open-api-common

6.0 vs 7.0
diff --git a/jane-php/open-api-common/6.0/bin/jane-open-api-generate b/jane-php/open-api-common/7.0/bin/jane-open-api-generate
index ab6ef287..7f5f95a6 100755
--- a/jane-php/open-api-common/6.0/bin/jane-open-api-generate
+++ b/jane-php/open-api-common/7.0/bin/jane-open-api-generate
@@ -3,12 +3,12 @@
 
 require __DIR__ . '/../vendor/autoload.php';
 
-use Jane\OpenApiCommon\Console\Command\GenerateCommand;
+use Jane\Component\OpenApiCommon\Console\Command\GenerateCommand;
+use Jane\Component\OpenApiCommon\Console\Loader\ConfigLoader;
+use Jane\Component\OpenApiCommon\Console\Loader\OpenApiMatcher;
+use Jane\Component\OpenApiCommon\Console\Loader\SchemaLoader;
 use Symfony\Component\Console\Input\ArrayInput;
 use Symfony\Component\Console\Output\NullOutput;
-use Jane\OpenApiCommon\Console\Loader\ConfigLoader;
-use Jane\OpenApiCommon\Console\Loader\OpenApiMatcher;
-use Jane\OpenApiCommon\Console\Loader\SchemaLoader;
 
 $command = new GenerateCommand(new ConfigLoader(), new SchemaLoader(), new OpenApiMatcher());
 $inputArray = new ArrayInput(['--config-file' => __DIR__ . '/../config/jane/open_api.php'], $command->getDefinition());

@symfony-recipes-bot symfony-recipes-bot enabled auto-merge (squash) January 28, 2025 12:13
Copy link
Member

@lyrixx lyrixx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@symfony-recipes-bot symfony-recipes-bot merged commit c640837 into symfony:main Jan 28, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants